MODULE	'exec/semaphores','utility/tagitem'

CONST	REQTOOLSVERSION=38
ENUM	RTPREF_FILEREQ,
		RTPREF_FONTREQ,
		RTPREF_PALETTEREQ,
		RTPREF_SCREENMODEREQ,
		RTPREF_VOLUMEREQ,
		RTPREF_OTHERREQ,
		RTPREF_NR_OF_REQ

OBJECT ReqDefaults
	Size:ULONG,
	ReqPos:ULONG,
	LeftOffset:UWORD,
	TopOffset:UWORD,
	MinEntries:UWORD,
	MaxEntries:UWORD

OBJECT ReqToolsPrefs
	PrefsSize:ULONG,
	PrefsSemaphore:SS,
	Flags:ULONG,
	ReqDefaults[RTPREF_NR_OF_REQ]:ReqDefaults

->CONST	RTPREFS_SIZE=SIZEOF_ReqToolsPrefs
FLAG	RTPR_DIRSFIRST,
		RTPR_DIRSMIXED,
		RTPR_IMMSORT,
		RTPR_NOSCRTOFRONT,
		RTPR_NOLED,
		RTPR_DEFAULTFONT,
		RTPR_DOWHEEL,
		RTPR_FKEYS,
		RTPR_FANCYWHEEL,
		RTPR_MMBPARENT

OBJECT ReqToolsBase
	Lib:LN,
	RTFlags:UBYTE,
	Pad[3]:UBYTE,
	SegList:BPTR,
	IntuitionBase:PTR TO IntuitionBase,
	GfxBase:PTR TO GfxBase,
	DOSBase:PTR TO DOSLibrary,
	GadToolsBase:PTR TO Library,
	UtilityBase:PTR TO Library,
	RealOpenCnt:UWORD,
	AvailFontsLock:UWORD,
	AvailFontsHeader:PTR TO AvailFontsHeader,
	FontsAssignType:ULONG,
	FontsAssignLock:BPTR,
	FontsAssignList:PTR TO AssignList,
	ReqToolsPrefs:PTR TO ReqToolsPrefs,
	prefspad:UWORD

ENUM	RT_FILEREQ,
		RT_REQINFO,
		RT_FONTREQ,
		RT_SCREENMODEREQ

OBJECT rtFileRequester
	ReqPos:ULONG,
	LeftOffset:UWORD,
	TopOffset:UWORD,
	Flags:ULONG,
	Dir:PTR TO CHAR,
	MatchPat:PTR TO CHAR,
	DefaultFont:PTR TO TextFont,
	WaitPointer:ULONG,
	LockWindow:ULONG,
	ShareIDCMP:ULONG,
	IntuiMsgFunc:PTR TO Hook,
	reserved1:UWORD,
	reserved2:UWORD,
	reserved3:UWORD,
	ReqHeight:UWORD

OBJECT rtFileList
	Next:PTR TO rtFileList,
	StrLen:ULONG,
	Name:PTR TO CHAR

OBJECT rtVolumeEntry
	Type:ULONG,
	Name:PTR TO CHAR

OBJECT rtFontRequester
	ReqPos:ULONG,
	LeftOffset:UWORD,
	TopOffset:UWORD,
	Flags:ULONG,
	Attr:PTR TO TextAttr,
	DefaultFont:PTR TO TextFont,
	WaitPointer:ULONG,
	LockWindow:ULONG,
	ShareIDCMP:ULONG,
	IntuiMsgFunc:PTR TO Hook,
	reserved1:UWORD,
	reserved2:UWORD,
	reserved3:UWORD,
	ReqHeight:UWORD

OBJECT rtScreenModeRequester
	ReqPos:ULONG,
	LeftOffset:UWORD,
	TopOffset:UWORD,
	Flags:ULONG,
	private1:ULONG,
	DisplayID:ULONG,
	DisplayWidth:UWORD,
	DisplayHeight:UWORD,
	DefaultFont:PTR TO TextFont,
	WaitPointer:ULONG,
	LockWindow:ULONG,
	ShareIDCMP:ULONG,
	IntuiMsgFunc:PTR TO Hook,
	reserved1:UWORD,
	reserved2:UWORD,
	reserved3:UWORD,
	ReqHeight:UWORD,
	DisplayDepth:UWORD,
	OverscanType:UWORD,
	AutoScroll:ULONG

OBJECT rtReqInfo
	ReqPos:ULONG,
	LeftOffset:UWORD,
	TopOffset:UWORD,
	Width:LONG,
	ReqTitle:PTR TO CHAR,
	Flags:LONG,
	DefaultFont:PTR TO TextFont,
	WaitPointer:ULONG,
	LockWindow:ULONG,
	ShareIDCMP:ULONG,
	IntuiMsgFunc:PTR TO Hook

OBJECT rtHandlerInfo
	private1:ULONG,
	WaitMask:ULONG,
	DoNotWait:ULONG

CONST	CALL_HANDLER=$80000000
ENUM	RT_TagBase=TAG_USER,
		RT_Window,
		RT_IDCMPFlags,
		RT_ReqPos,
		RT_LeftOffset,
		RT_TopOffset,
		RT_PubScrName,
		RT_Screen,
		RT_ReqHandler,
		RT_DefaultFont,
		RT_WaitPointer,
		RT_Underscore,
		RT_ShareIDCMP,
		RT_LockWindow,
		RT_ScreenToFront,
		RT_TextAttr,
		RT_IntuiMsgFunc,
		RT_Locale
ENUM	RTEZ_ReqTitle=RT_TagBase+20,
		RTEZ_Flags,
		RTEZ_DefaultResponse
ENUM	RTGL_Min=RT_TagBase+30,
		RTGL_Max,
		RTGL_Width,
		RTGL_ShowDefault,
		RTGL_GadFmt,
		RTGL_GadFmtArgs,
		RTGL_Invisible,
		RTGL_BackFill,
		RTGL_TextFmt,
		RTGL_TextFmtArgs,
		RTGL_CenterText=RT_TagBase+100,
		RTGL_Flags=RTEZ_Flags
ENUM	RTGS_Width=$80000020,
		RTGS_AllowEmpty=$80000050,
		RTGS_GadFmt=$80000022,
		RTGS_GadFmtArgs=$80000023,
		RTGS_Invisible=$80000024,
		RTGS_BackFill=$80000025,
		RTGS_TextFmt=$80000026,
		RTGS_TextFmtArgs=$80000027,
		RTGS_CenterText=$80000064,
		RTGS_Flags=$80000016
ENUM	RTFI_Flags=$80000028,
		RTFI_Height=$80000029,
		RTFI_OKText=$8000002A,
		RTFI_VolumeRequest=$8000002B,
		RTFI_FilterFunc=$8000002C,
		RTFI_AllowEmpty=$8000002D
ENUM	RTFO_Flags=$80000028,
		RTFO_Height=$80000029,
		RTFO_OKText=$8000002A,
		RTFO_SampleHeight=$8000003C,
		RTFO_MinHeight=$8000003D,
		RTFO_MaxHeight=$8000003E,
		RTFO_FilterFunc=$8000002C
ENUM	RTSC_Flags=$80000028,
		RTSC_Height=$80000029,
		RTSC_OKText=$8000002A,
		RTSC_PropertyFlags=$8000005A,
		RTSC_PropertyMask=$8000005B,
		RTSC_MinWidth=$8000005C,
		RTSC_MaxWidth=$8000005D,
		RTSC_MinHeight=$8000005E,
		RTSC_MaxHeight=$8000005F,
		RTSC_MinDepth=$80000060,
		RTSC_MaxDepth=$80000061,
		RTSC_FilterFunc=$8000002C
ENUM	RTFI_Dir=$80000032,
		RTFI_MatchPat=$80000033,
		RTFI_AddEntry=$80000034,
		RTFI_RemoveEntry=$80000035,
		RTFO_FontName=$8000003F,
		RTFO_FontHeight=$80000040,
		RTFO_FontStyle=$80000041,
		RTFO_FontFlags=$80000042,
		RTSC_ModeFromScreen=$80000050,
		RTSC_DisplayID=$80000051,
		RTSC_DisplayWidth=$80000052,
		RTSC_DisplayHeight=$80000053,
		RTSC_DisplayDepth=$80000054,
		RTSC_OverscanType=$80000055,
		RTSC_AutoScroll=$80000056,
		RTPA_Color=$80000046,
		RTRH_EndRequest=$8000003C,
		REQPOS_POINTER=0,
		REQPOS_CENTERWIN=1,
		REQPOS_CENTERSCR=2,
		REQPOS_TOPLEFTWIN=3,
		REQPOS_TOPLEFTSCR=4,
		REQ_CANCEL=0,
		REQ_OK=1,
		FREQF_NOBUFFER=4,
		FREQF_MULTISELECT=1,
		FREQF_SAVE=2,
		FREQF_NOFILES=8,
		FREQF_PATGAD=16,
		FREQF_SELECTDIRS=$1000,
		FREQF_FIXEDWIDTH=$20,
		FREQF_COLORFONTS=$40,
		FREQF_CHANGEPALETTE=$80,
		FREQF_LEAVEPALETTE=$100,
		FREQF_SCALE=$200,
		FREQF_STYLE=$400,
		SCREQF_SIZEGADS=$2000,
		SCREQF_DEPTHGAD=$4000,
		SCREQF_NONSTDMODES=$8000,
		SCREQF_GUIMODES=$10000,
		SCREQF_AUTOSCROLLGAD=$40000,
		SCREQF_OVERSCANGAD=$80000,
		EZREQF_NORETURNKEY=1,
		EZREQF_LAMIGAQUAL=2,
		EZREQF_CENTERTEXT=4,
		GLREQF_CENTERTEXT=4,
		GLREQF_HIGHLIGHTTEXT=8,
		GSREQF_CENTERTEXT=4,
		GSREQF_HIGHLIGHTTEXT=8,
		VREQF_NOASSIGNS=1,
		VREQF_NODISKS=2,
		VREQF_ALLDISKS=4,
		RTFI_HOOK=12,
		RTFO_HOOK=12,
		REQHOOK_WILDFILE=0,
		REQHOOK_WILDFONT=1,
		FREQF_DOWILDFUNC=$800
